Getting Started
This will guide you in setting up FridgeBridge iny your local environment for developing/contributing.
Dependencies
Before, make sure you have the following dependencies:
- java: we suggest installing at least version 22 and the openJDK version
- maven: the package manager we are using
- docker engine and docker-compose plugin: we use it for quickly setup the rabbit and postgress instance and deploy the project in prod.
How to run
- Clone the project:
git clone https://github.com/Lisandrogq/DDS-Grupo11/tree/main
- cd into anual folder:
cd anual
- Setup the
.env
file (change it as you need):make setup_env
- Start the server:
make start
- Run test with:
make test
- For all commands run:
make help
Adminer When developing you might want to see the current status of the database. You could enter the into the postgres container shell and use the cli tool by running:
docker exec -it fridge-bridge-postgres-1 sh
or use the adminer GUI though a browser by opening: http://localhost:8080/?pgsql=postgres&username=postgres&db=postgres&ns=public
Docs
To run the documentation front-end run:
make docs_install
make docs_dev
Metrics
To start metrics services run:
make start_metrics
Mocking db
In testing environments, you might want to fill your db with mock data to run different tests. For that you need to:
- Run the project:
make start
, this will start the necessary containers for the db and create the tables with hibernate. - Then run:
make mock-db
- Check that data has been inserted.